using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace DTO
{
	/// <summary> 
	///Author: nnamthach@gmail.com 
	/// <summary>
	
    public class SPMFGRNInfo
    {
		#region Local Variable
		public enum Field
		{
			GRN_REF,
			GRN_DATE,
			STATUS,
			DEL_ADDR,
			ORDER_REF,
			TRANS_TYPE,
			ID_RELEASED,
			PAY_DATE,
			ORDER_DATE,
			Type,
			Period,
			TransDate,
			Reference,
			ShipmentDate,
			ShipmentBy,
			BLAWBNo,
			DeliveryPoint,
			Remark,
			From_,
			To_,
			Supplier,
			WellCode,
			Department,
			PINo,
			POSOContract,
			EX_SUPP_CODE1,
			EX_SUPP_CODE2,
			EX_TEXT1,
			EX_TEXT2,
			EX_TEXT3,
			EX_TEXT4,
			EX_TEXT5,
			EX_TEXT6,
			EX_TEXT7,
			EX_VAL1,
			EX_VAL2,
			EX_VAL3
		}
		private String _GRN_REF;
		private Int32 _GRN_DATE;
		private String _STATUS;
		private String _DEL_ADDR;
		private String _ORDER_REF;
		private String _TRANS_TYPE;
		private String _ID_RELEASED;
		private Int32 _PAY_DATE;
		private Int32 _ORDER_DATE;
		private String _Type;
		private Int32 _Period;
		private DateTime _TransDate;
		private String _Reference;
		private DateTime _ShipmentDate;
		private String _ShipmentBy;
		private String _BLAWBNo;
		private String _DeliveryPoint;
		private String _Remark;
		private String _From_;
		private String _To_;
		private String _Supplier;
		private String _WellCode;
		private String _Department;
		private String _PINo;
		private String _POSOContract;
		private String _EX_SUPP_CODE1;
		private String _EX_SUPP_CODE2;
		private String _EX_TEXT1;
		private String _EX_TEXT2;
		private String _EX_TEXT3;
		private String _EX_TEXT4;
		private String _EX_TEXT5;
		private String _EX_TEXT6;
		private String _EX_TEXT7;
		private Decimal _EX_VAL1;
		private Decimal _EX_VAL2;
		private Decimal _EX_VAL3;
		
		public String GRN_REF{	get{ return _GRN_REF;} set{_GRN_REF = value;} }
		public Int32 GRN_DATE{	get{ return _GRN_DATE;} set{_GRN_DATE = value;} }
		public String STATUS{	get{ return _STATUS;} set{_STATUS = value;} }
		public String DEL_ADDR{	get{ return _DEL_ADDR;} set{_DEL_ADDR = value;} }
		public String ORDER_REF{	get{ return _ORDER_REF;} set{_ORDER_REF = value;} }
		public String TRANS_TYPE{	get{ return _TRANS_TYPE;} set{_TRANS_TYPE = value;} }
		public String ID_RELEASED{	get{ return _ID_RELEASED;} set{_ID_RELEASED = value;} }
		public Int32 PAY_DATE{	get{ return _PAY_DATE;} set{_PAY_DATE = value;} }
		public Int32 ORDER_DATE{	get{ return _ORDER_DATE;} set{_ORDER_DATE = value;} }
		public String Type{	get{ return _Type;} set{_Type = value;} }
		public Int32 Period{	get{ return _Period;} set{_Period = value;} }
		public DateTime TransDate{	get{ return _TransDate;} set{_TransDate = value;} }
		public String Reference{	get{ return _Reference;} set{_Reference = value;} }
		public DateTime ShipmentDate{	get{ return _ShipmentDate;} set{_ShipmentDate = value;} }
		public String ShipmentBy{	get{ return _ShipmentBy;} set{_ShipmentBy = value;} }
		public String BLAWBNo{	get{ return _BLAWBNo;} set{_BLAWBNo = value;} }
		public String DeliveryPoint{	get{ return _DeliveryPoint;} set{_DeliveryPoint = value;} }
		public String Remark{	get{ return _Remark;} set{_Remark = value;} }
		public String From_{	get{ return _From_;} set{_From_ = value;} }
		public String To_{	get{ return _To_;} set{_To_ = value;} }
		public String Supplier{	get{ return _Supplier;} set{_Supplier = value;} }
		public String WellCode{	get{ return _WellCode;} set{_WellCode = value;} }
		public String Department{	get{ return _Department;} set{_Department = value;} }
		public String PINo{	get{ return _PINo;} set{_PINo = value;} }
		public String POSOContract{	get{ return _POSOContract;} set{_POSOContract = value;} }
		public String EX_SUPP_CODE1{	get{ return _EX_SUPP_CODE1;} set{_EX_SUPP_CODE1 = value;} }
		public String EX_SUPP_CODE2{	get{ return _EX_SUPP_CODE2;} set{_EX_SUPP_CODE2 = value;} }
		public String EX_TEXT1{	get{ return _EX_TEXT1;} set{_EX_TEXT1 = value;} }
		public String EX_TEXT2{	get{ return _EX_TEXT2;} set{_EX_TEXT2 = value;} }
		public String EX_TEXT3{	get{ return _EX_TEXT3;} set{_EX_TEXT3 = value;} }
		public String EX_TEXT4{	get{ return _EX_TEXT4;} set{_EX_TEXT4 = value;} }
		public String EX_TEXT5{	get{ return _EX_TEXT5;} set{_EX_TEXT5 = value;} }
		public String EX_TEXT6{	get{ return _EX_TEXT6;} set{_EX_TEXT6 = value;} }
		public String EX_TEXT7{	get{ return _EX_TEXT7;} set{_EX_TEXT7 = value;} }
		public Decimal EX_VAL1{	get{ return _EX_VAL1;} set{_EX_VAL1 = value;} }
		public Decimal EX_VAL2{	get{ return _EX_VAL2;} set{_EX_VAL2 = value;} }
		public Decimal EX_VAL3{	get{ return _EX_VAL3;} set{_EX_VAL3 = value;} }
		
        #endregion LocalVariable
        
        #region Constructor
		public SPMFGRNInfo()
		{
			_GRN_REF = "";
			_GRN_DATE = 0;
			_STATUS = "";
			_DEL_ADDR = "";
			_ORDER_REF = "";
			_TRANS_TYPE = "";
			_ID_RELEASED = "";
			_PAY_DATE = 0;
			_ORDER_DATE = 0;
			_Type = "";
			_Period = 0;
			_TransDate = DateTime.Now;
			_Reference = "";
			_ShipmentDate = DateTime.Now;
			_ShipmentBy = "";
			_BLAWBNo = "";
			_DeliveryPoint = "";
			_Remark = "";
			_From_ = "";
			_To_ = "";
			_Supplier = "";
			_WellCode = "";
			_Department = "";
			_PINo = "";
			_POSOContract = "";
			_EX_SUPP_CODE1 = "";
			_EX_SUPP_CODE2 = "";
			_EX_TEXT1 = "";
			_EX_TEXT2 = "";
			_EX_TEXT3 = "";
			_EX_TEXT4 = "";
			_EX_TEXT5 = "";
			_EX_TEXT6 = "";
			_EX_TEXT7 = "";
			_EX_VAL1 = 0;
			_EX_VAL2 = 0;
			_EX_VAL3 = 0;
		}
		
		public SPMFGRNInfo(
		String GRN_REF,
		Int32 GRN_DATE,
		String STATUS,
		String DEL_ADDR,
		String ORDER_REF,
		String TRANS_TYPE,
		String ID_RELEASED,
		Int32 PAY_DATE,
		Int32 ORDER_DATE,
		String Type,
		Int32 Period,
		DateTime TransDate,
		String Reference,
		DateTime ShipmentDate,
		String ShipmentBy,
		String BLAWBNo,
		String DeliveryPoint,
		String Remark,
		String From_,
		String To_,
		String Supplier,
		String WellCode,
		String Department,
		String PINo,
		String POSOContract,
		String EX_SUPP_CODE1,
		String EX_SUPP_CODE2,
		String EX_TEXT1,
		String EX_TEXT2,
		String EX_TEXT3,
		String EX_TEXT4,
		String EX_TEXT5,
		String EX_TEXT6,
		String EX_TEXT7,
		Decimal EX_VAL1,
		Decimal EX_VAL2,
		Decimal EX_VAL3
		)
		{
			_GRN_REF = GRN_REF;
			_GRN_DATE = GRN_DATE;
			_STATUS = STATUS;
			_DEL_ADDR = DEL_ADDR;
			_ORDER_REF = ORDER_REF;
			_TRANS_TYPE = TRANS_TYPE;
			_ID_RELEASED = ID_RELEASED;
			_PAY_DATE = PAY_DATE;
			_ORDER_DATE = ORDER_DATE;
			_Type = Type;
			_Period = Period;
			_TransDate = TransDate;
			_Reference = Reference;
			_ShipmentDate = ShipmentDate;
			_ShipmentBy = ShipmentBy;
			_BLAWBNo = BLAWBNo;
			_DeliveryPoint = DeliveryPoint;
			_Remark = Remark;
			_From_ = From_;
			_To_ = To_;
			_Supplier = Supplier;
			_WellCode = WellCode;
			_Department = Department;
			_PINo = PINo;
			_POSOContract = POSOContract;
			_EX_SUPP_CODE1 = EX_SUPP_CODE1;
			_EX_SUPP_CODE2 = EX_SUPP_CODE2;
			_EX_TEXT1 = EX_TEXT1;
			_EX_TEXT2 = EX_TEXT2;
			_EX_TEXT3 = EX_TEXT3;
			_EX_TEXT4 = EX_TEXT4;
			_EX_TEXT5 = EX_TEXT5;
			_EX_TEXT6 = EX_TEXT6;
			_EX_TEXT7 = EX_TEXT7;
			_EX_VAL1 = EX_VAL1;
			_EX_VAL2 = EX_VAL2;
			_EX_VAL3 = EX_VAL3;
		}
		public SPMFGRNInfo(DataRow dr)
		{
			if (dr != null)
			{
				_GRN_REF = dr[Field.GRN_REF.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.GRN_REF.ToString()]);
				_GRN_DATE = dr[Field.GRN_DATE.ToString()] == DBNull.Value?0:Convert.ToInt32(dr[Field.GRN_DATE.ToString()]);
				_STATUS = dr[Field.STATUS.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.STATUS.ToString()]);
				_DEL_ADDR = dr[Field.DEL_ADDR.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.DEL_ADDR.ToString()]);
				_ORDER_REF = dr[Field.ORDER_REF.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.ORDER_REF.ToString()]);
				_TRANS_TYPE = dr[Field.TRANS_TYPE.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.TRANS_TYPE.ToString()]);
				_ID_RELEASED = dr[Field.ID_RELEASED.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.ID_RELEASED.ToString()]);
				_PAY_DATE = dr[Field.PAY_DATE.ToString()] == DBNull.Value?0:Convert.ToInt32(dr[Field.PAY_DATE.ToString()]);
				_ORDER_DATE = dr[Field.ORDER_DATE.ToString()] == DBNull.Value?0:Convert.ToInt32(dr[Field.ORDER_DATE.ToString()]);
				_Type = dr[Field.Type.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.Type.ToString()]);
				_Period = dr[Field.Period.ToString()] == DBNull.Value?0:Convert.ToInt32(dr[Field.Period.ToString()]);
				_TransDate = dr[Field.TransDate.ToString()] == DBNull.Value?DateTime.Now:Convert.ToDateTime(dr[Field.TransDate.ToString()]);
				_Reference = dr[Field.Reference.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.Reference.ToString()]);
				_ShipmentDate = dr[Field.ShipmentDate.ToString()] == DBNull.Value?DateTime.Now:Convert.ToDateTime(dr[Field.ShipmentDate.ToString()]);
				_ShipmentBy = dr[Field.ShipmentBy.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.ShipmentBy.ToString()]);
				_BLAWBNo = dr[Field.BLAWBNo.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.BLAWBNo.ToString()]);
				_DeliveryPoint = dr[Field.DeliveryPoint.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.DeliveryPoint.ToString()]);
				_Remark = dr[Field.Remark.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.Remark.ToString()]);
				_From_ = dr[Field.From_.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.From_.ToString()]);
				_To_ = dr[Field.To_.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.To_.ToString()]);
				_Supplier = dr[Field.Supplier.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.Supplier.ToString()]);
				_WellCode = dr[Field.WellCode.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.WellCode.ToString()]);
				_Department = dr[Field.Department.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.Department.ToString()]);
				_PINo = dr[Field.PINo.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.PINo.ToString()]);
				_POSOContract = dr[Field.POSOContract.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.POSOContract.ToString()]);
				_EX_SUPP_CODE1 = dr[Field.EX_SUPP_CODE1.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.EX_SUPP_CODE1.ToString()]);
				_EX_SUPP_CODE2 = dr[Field.EX_SUPP_CODE2.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.EX_SUPP_CODE2.ToString()]);
				_EX_TEXT1 = dr[Field.EX_TEXT1.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.EX_TEXT1.ToString()]);
				_EX_TEXT2 = dr[Field.EX_TEXT2.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.EX_TEXT2.ToString()]);
				_EX_TEXT3 = dr[Field.EX_TEXT3.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.EX_TEXT3.ToString()]);
				_EX_TEXT4 = dr[Field.EX_TEXT4.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.EX_TEXT4.ToString()]);
				_EX_TEXT5 = dr[Field.EX_TEXT5.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.EX_TEXT5.ToString()]);
				_EX_TEXT6 = dr[Field.EX_TEXT6.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.EX_TEXT6.ToString()]);
				_EX_TEXT7 = dr[Field.EX_TEXT7.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.EX_TEXT7.ToString()]);
				_EX_VAL1 = dr[Field.EX_VAL1.ToString()] == DBNull.Value?0:Convert.ToDecimal(dr[Field.EX_VAL1.ToString()]);
				_EX_VAL2 = dr[Field.EX_VAL2.ToString()] == DBNull.Value?0:Convert.ToDecimal(dr[Field.EX_VAL2.ToString()]);
				_EX_VAL3 = dr[Field.EX_VAL3.ToString()] == DBNull.Value?0:Convert.ToDecimal(dr[Field.EX_VAL3.ToString()]);
			}
		}
		public SPMFGRNInfo(DataRowView dr)
		{
			if (dr != null)
			{
				_GRN_REF = dr[Field.GRN_REF.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.GRN_REF.ToString()]);
				_GRN_DATE = dr[Field.GRN_DATE.ToString()] == DBNull.Value?0:Convert.ToInt32(dr[Field.GRN_DATE.ToString()]);
				_STATUS = dr[Field.STATUS.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.STATUS.ToString()]);
				_DEL_ADDR = dr[Field.DEL_ADDR.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.DEL_ADDR.ToString()]);
				_ORDER_REF = dr[Field.ORDER_REF.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.ORDER_REF.ToString()]);
				_TRANS_TYPE = dr[Field.TRANS_TYPE.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.TRANS_TYPE.ToString()]);
				_ID_RELEASED = dr[Field.ID_RELEASED.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.ID_RELEASED.ToString()]);
				_PAY_DATE = dr[Field.PAY_DATE.ToString()] == DBNull.Value?0:Convert.ToInt32(dr[Field.PAY_DATE.ToString()]);
				_ORDER_DATE = dr[Field.ORDER_DATE.ToString()] == DBNull.Value?0:Convert.ToInt32(dr[Field.ORDER_DATE.ToString()]);
				_Type = dr[Field.Type.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.Type.ToString()]);
				_Period = dr[Field.Period.ToString()] == DBNull.Value?0:Convert.ToInt32(dr[Field.Period.ToString()]);
				_TransDate = dr[Field.TransDate.ToString()] == DBNull.Value?DateTime.Now:Convert.ToDateTime(dr[Field.TransDate.ToString()]);
				_Reference = dr[Field.Reference.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.Reference.ToString()]);
				_ShipmentDate = dr[Field.ShipmentDate.ToString()] == DBNull.Value?DateTime.Now:Convert.ToDateTime(dr[Field.ShipmentDate.ToString()]);
				_ShipmentBy = dr[Field.ShipmentBy.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.ShipmentBy.ToString()]);
				_BLAWBNo = dr[Field.BLAWBNo.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.BLAWBNo.ToString()]);
				_DeliveryPoint = dr[Field.DeliveryPoint.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.DeliveryPoint.ToString()]);
				_Remark = dr[Field.Remark.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.Remark.ToString()]);
				_From_ = dr[Field.From_.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.From_.ToString()]);
				_To_ = dr[Field.To_.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.To_.ToString()]);
				_Supplier = dr[Field.Supplier.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.Supplier.ToString()]);
				_WellCode = dr[Field.WellCode.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.WellCode.ToString()]);
				_Department = dr[Field.Department.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.Department.ToString()]);
				_PINo = dr[Field.PINo.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.PINo.ToString()]);
				_POSOContract = dr[Field.POSOContract.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.POSOContract.ToString()]);
				_EX_SUPP_CODE1 = dr[Field.EX_SUPP_CODE1.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.EX_SUPP_CODE1.ToString()]);
				_EX_SUPP_CODE2 = dr[Field.EX_SUPP_CODE2.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.EX_SUPP_CODE2.ToString()]);
				_EX_TEXT1 = dr[Field.EX_TEXT1.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.EX_TEXT1.ToString()]);
				_EX_TEXT2 = dr[Field.EX_TEXT2.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.EX_TEXT2.ToString()]);
				_EX_TEXT3 = dr[Field.EX_TEXT3.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.EX_TEXT3.ToString()]);
				_EX_TEXT4 = dr[Field.EX_TEXT4.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.EX_TEXT4.ToString()]);
				_EX_TEXT5 = dr[Field.EX_TEXT5.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.EX_TEXT5.ToString()]);
				_EX_TEXT6 = dr[Field.EX_TEXT6.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.EX_TEXT6.ToString()]);
				_EX_TEXT7 = dr[Field.EX_TEXT7.ToString()] == DBNull.Value?"":Convert.ToString(dr[Field.EX_TEXT7.ToString()]);
				_EX_VAL1 = dr[Field.EX_VAL1.ToString()] == DBNull.Value?0:Convert.ToDecimal(dr[Field.EX_VAL1.ToString()]);
				_EX_VAL2 = dr[Field.EX_VAL2.ToString()] == DBNull.Value?0:Convert.ToDecimal(dr[Field.EX_VAL2.ToString()]);
				_EX_VAL3 = dr[Field.EX_VAL3.ToString()] == DBNull.Value?0:Convert.ToDecimal(dr[Field.EX_VAL3.ToString()]);
			}
		}
		public SPMFGRNInfo(SPMFGRNInfo objEntr)
		{			
			_GRN_REF = objEntr.GRN_REF;			
			_GRN_DATE = objEntr.GRN_DATE;			
			_STATUS = objEntr.STATUS;			
			_DEL_ADDR = objEntr.DEL_ADDR;			
			_ORDER_REF = objEntr.ORDER_REF;			
			_TRANS_TYPE = objEntr.TRANS_TYPE;			
			_ID_RELEASED = objEntr.ID_RELEASED;			
			_PAY_DATE = objEntr.PAY_DATE;			
			_ORDER_DATE = objEntr.ORDER_DATE;			
			_Type = objEntr.Type;			
			_Period = objEntr.Period;			
			_TransDate = objEntr.TransDate;			
			_Reference = objEntr.Reference;			
			_ShipmentDate = objEntr.ShipmentDate;			
			_ShipmentBy = objEntr.ShipmentBy;			
			_BLAWBNo = objEntr.BLAWBNo;			
			_DeliveryPoint = objEntr.DeliveryPoint;			
			_Remark = objEntr.Remark;			
			_From_ = objEntr.From_;			
			_To_ = objEntr.To_;			
			_Supplier = objEntr.Supplier;			
			_WellCode = objEntr.WellCode;			
			_Department = objEntr.Department;			
			_PINo = objEntr.PINo;			
			_POSOContract = objEntr.POSOContract;			
			_EX_SUPP_CODE1 = objEntr.EX_SUPP_CODE1;			
			_EX_SUPP_CODE2 = objEntr.EX_SUPP_CODE2;			
			_EX_TEXT1 = objEntr.EX_TEXT1;			
			_EX_TEXT2 = objEntr.EX_TEXT2;			
			_EX_TEXT3 = objEntr.EX_TEXT3;			
			_EX_TEXT4 = objEntr.EX_TEXT4;			
			_EX_TEXT5 = objEntr.EX_TEXT5;			
			_EX_TEXT6 = objEntr.EX_TEXT6;			
			_EX_TEXT7 = objEntr.EX_TEXT7;			
			_EX_VAL1 = objEntr.EX_VAL1;			
			_EX_VAL2 = objEntr.EX_VAL2;			
			_EX_VAL3 = objEntr.EX_VAL3;			
		}
        #endregion Constructor
        
        #region InitTable
		public static DataTable ToDataTable()
		{
			DataTable dt = new DataTable("SPMFGRNHVJ");
			dt.Columns.AddRange(new DataColumn[] { 
				new DataColumn(Field.GRN_REF.ToString(), typeof(String)),
				new DataColumn(Field.GRN_DATE.ToString(), typeof(Int32)),
				new DataColumn(Field.STATUS.ToString(), typeof(String)),
				new DataColumn(Field.DEL_ADDR.ToString(), typeof(String)),
				new DataColumn(Field.ORDER_REF.ToString(), typeof(String)),
				new DataColumn(Field.TRANS_TYPE.ToString(), typeof(String)),
				new DataColumn(Field.ID_RELEASED.ToString(), typeof(String)),
				new DataColumn(Field.PAY_DATE.ToString(), typeof(Int32)),
				new DataColumn(Field.ORDER_DATE.ToString(), typeof(Int32)),
				new DataColumn(Field.Type.ToString(), typeof(String)),
				new DataColumn(Field.Period.ToString(), typeof(Int32)),
				new DataColumn(Field.TransDate.ToString(), typeof(DateTime)),
				new DataColumn(Field.Reference.ToString(), typeof(String)),
				new DataColumn(Field.ShipmentDate.ToString(), typeof(DateTime)),
				new DataColumn(Field.ShipmentBy.ToString(), typeof(String)),
				new DataColumn(Field.BLAWBNo.ToString(), typeof(String)),
				new DataColumn(Field.DeliveryPoint.ToString(), typeof(String)),
				new DataColumn(Field.Remark.ToString(), typeof(String)),
				new DataColumn(Field.From_.ToString(), typeof(String)),
				new DataColumn(Field.To_.ToString(), typeof(String)),
				new DataColumn(Field.Supplier.ToString(), typeof(String)),
				new DataColumn(Field.WellCode.ToString(), typeof(String)),
				new DataColumn(Field.Department.ToString(), typeof(String)),
				new DataColumn(Field.PINo.ToString(), typeof(String)),
				new DataColumn(Field.POSOContract.ToString(), typeof(String)),
				new DataColumn(Field.EX_SUPP_CODE1.ToString(), typeof(String)),
				new DataColumn(Field.EX_SUPP_CODE2.ToString(), typeof(String)),
				new DataColumn(Field.EX_TEXT1.ToString(), typeof(String)),
				new DataColumn(Field.EX_TEXT2.ToString(), typeof(String)),
				new DataColumn(Field.EX_TEXT3.ToString(), typeof(String)),
				new DataColumn(Field.EX_TEXT4.ToString(), typeof(String)),
				new DataColumn(Field.EX_TEXT5.ToString(), typeof(String)),
				new DataColumn(Field.EX_TEXT6.ToString(), typeof(String)),
				new DataColumn(Field.EX_TEXT7.ToString(), typeof(String)),
				new DataColumn(Field.EX_VAL1.ToString(), typeof(Decimal)),
				new DataColumn(Field.EX_VAL2.ToString(), typeof(Decimal)),
				new DataColumn(Field.EX_VAL3.ToString(), typeof(Decimal))
			});
			return dt;
		}
		public DataRow ToDataRow(DataTable dt)
		{
			DataRow row = dt.NewRow();
			row[Field.GRN_REF.ToString()] = _GRN_REF;
			row[Field.GRN_DATE.ToString()] = _GRN_DATE;
			row[Field.STATUS.ToString()] = _STATUS;
			row[Field.DEL_ADDR.ToString()] = _DEL_ADDR;
			row[Field.ORDER_REF.ToString()] = _ORDER_REF;
			row[Field.TRANS_TYPE.ToString()] = _TRANS_TYPE;
			row[Field.ID_RELEASED.ToString()] = _ID_RELEASED;
			row[Field.PAY_DATE.ToString()] = _PAY_DATE;
			row[Field.ORDER_DATE.ToString()] = _ORDER_DATE;
			row[Field.Type.ToString()] = _Type;
			row[Field.Period.ToString()] = _Period;
			row[Field.TransDate.ToString()] = _TransDate;
			row[Field.Reference.ToString()] = _Reference;
			row[Field.ShipmentDate.ToString()] = _ShipmentDate;
			row[Field.ShipmentBy.ToString()] = _ShipmentBy;
			row[Field.BLAWBNo.ToString()] = _BLAWBNo;
			row[Field.DeliveryPoint.ToString()] = _DeliveryPoint;
			row[Field.Remark.ToString()] = _Remark;
			row[Field.From_.ToString()] = _From_;
			row[Field.To_.ToString()] = _To_;
			row[Field.Supplier.ToString()] = _Supplier;
			row[Field.WellCode.ToString()] = _WellCode;
			row[Field.Department.ToString()] = _Department;
			row[Field.PINo.ToString()] = _PINo;
			row[Field.POSOContract.ToString()] = _POSOContract;
			row[Field.EX_SUPP_CODE1.ToString()] = _EX_SUPP_CODE1;
			row[Field.EX_SUPP_CODE2.ToString()] = _EX_SUPP_CODE2;
			row[Field.EX_TEXT1.ToString()] = _EX_TEXT1;
			row[Field.EX_TEXT2.ToString()] = _EX_TEXT2;
			row[Field.EX_TEXT3.ToString()] = _EX_TEXT3;
			row[Field.EX_TEXT4.ToString()] = _EX_TEXT4;
			row[Field.EX_TEXT5.ToString()] = _EX_TEXT5;
			row[Field.EX_TEXT6.ToString()] = _EX_TEXT6;
			row[Field.EX_TEXT7.ToString()] = _EX_TEXT7;
			row[Field.EX_VAL1.ToString()] = _EX_VAL1;
			row[Field.EX_VAL2.ToString()] = _EX_VAL2;
			row[Field.EX_VAL3.ToString()] = _EX_VAL3;
			return row;
		}
        #endregion InitTable
    }
}
